package com.sghd.candy.module.box.manager;

import java.util.Random;

/**
 * @author Allen
 * @date 2018/12/25
 */
public class BoxOpenMoney extends BoxOpenDrop {
    private Integer minMoney;
    private Integer maxMoney;

    public Integer getMinMoney() {
        return minMoney;
    }

    public void setMinMoney(Integer minMoney) {
        this.minMoney = minMoney;
    }

    public Integer getMaxMoney() {
        return maxMoney;
    }

    public void setMaxMoney(Integer maxMoney) {
        this.maxMoney = maxMoney;
    }

    public int getRandomMoney() {
        Random rand = new Random();
        int randomMoney = rand.nextInt(this.maxMoney - this.minMoney + 1) + this.minMoney;
        return randomMoney / 10 * 10;
    }
}
